
package com.trp.engine;

import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.UriMatcher;
import android.database.Cursor;
import android.net.Uri;

public class DataProvider extends ContentProvider {

    public static final Uri CONTENT_URI = Uri.parse("content://com.trp.giscontent.provider/");

    private static final UriMatcher sMatcher = new UriMatcher(UriMatcher.NO_MATCH);

    private static final int URI_CODE_LOAD_ALL = 0x0001;

    private static final int URI_CODE_500KV_LOAD_ALL = 0x1000;

    private static final int URI_CODE_500KV_LOAD_CIRCUIT = 0x1001;

    private static final int URI_CODE_500KV_LOAD_CIRCUIT_SECTION = 0x1002;

    private static final int URI_CODE_500KV_LOAD_POLE = 0x1003;

    private static final int URI_CODE_500KV_LOAD_OVERHEAD_CIRCUIT = 0x1004;

    private static final int URI_CODE_500KV_LOAD_CABLE = 0x1005;

    private static final int URI_CODE_220KV_LOAD_ALL = 0x2000;

    private static final int URI_CODE_110KV_LOAD_ALL = 0x3000;

    static {
        sMatcher.addURI("500KV", "/", URI_CODE_500KV_LOAD_ALL);
        sMatcher.addURI("220KV", "/", URI_CODE_220KV_LOAD_ALL);
        sMatcher.addURI("110KV", "/", URI_CODE_110KV_LOAD_ALL);
    }

    private DataEngine mDataEngine;

    @Override
    public int delete(Uri uri, String selection, String[] selectionArgs) {
        return 0;
    }

    @Override
    public String getType(Uri uri) {
        return null;
    }

    @Override
    public Uri insert(Uri uri, ContentValues values) {
        return null;
    }

    @Override
    public boolean onCreate() {
        mDataEngine = new DataEngineDefaultImpl();
        return false;
    }

    @Override
    public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
            String sortOrder) {
        int matchCode = sMatcher.match(uri);
        switch (matchCode) {
            case URI_CODE_500KV_LOAD_ALL:
        }
        return null;
    }

    @Override
    public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
        return 0;
    }

}
